package com.chixing.Homework;

public class B extends A {
    public int func1(int a, int b) {
        return a + b;
    }
    public static void main(String[] args) {
        A a = new B();//父类中创建了子类对象
        B b = new B();//子类中创建了子类对象
        System.out.println("Result=" + a.func1(100, 50));
        System.out.println("Result=" + b.func1(100, 50));
    }
}
